package me.zhengjie.server;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.dao.*;
import me.zhengjie.utils.PageResult;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.List;

/**
* @author hws
* @description 针对表【iws_outbound_order(出库单)】的数据库操作Service
* @createDate 2025-06-10 08:54:56
*/
public interface OutboundOrderService extends IService<OutboundOrder> {

    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List<OutboundOrder>
     */
    PageResult<OutboundOrder> queryAll(OutboundOrder criteria);

    /**
     * 查询数据分页
     * @param criteria 条件
     * @param page 分页参数
     * @return PageResult
     */
    PageResult<OutboundOrder> queryAll(OutboundOrder criteria, Page<Object> page);

    void download(List<OutboundOrder> outboundOrders, HttpServletResponse response) throws IOException;

    int addOutboundOrder(OutboundOrder resources) throws InterruptedException;

    //创建出库任务
    OutboundOrderDao outboundJob(String outboundOrderNo) throws InterruptedException, UnknownHostException;

    //判断现在是否有出库任务
    List<String> exitOutboudOrder();


    ComputeDao computeWeight(List<TransDao> transDaos);

    PageResult<OutboundOrderHistory> getOutOrderHistory(OutboundOrderHistory param);

    PageResult<OutboundOrderDetailDao> getOutOrderHistoryDetail(OutOrderHistoryDetailDao dao);

    PageResult<MaterialDao> noMaterials(NoMaterialsDao param);

    int handiwork(HandiWorkDao handiWorkDao);

    int notOutBoundOrder(OutboundOrder resources);
    //查询现在有没有在进行的任务·
    boolean outBoundOrder();

    Object updateForStatus(OutboundOrder resources);
}
